package com.liang.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.liang.entity.CComment;
import com.liang.mapper.CCommentMapper;
import com.liang.service.CCommentService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author 李昂
 * @since 2020-11-30
 */
@Service
public class CCommentServiceImpl extends ServiceImpl<CCommentMapper, CComment> implements CCommentService {

    //添加评论
    @Override
    public boolean InsertBlogComment(CComment comment) {
        return this.save(comment);
    }

    @Override
    public List<CComment> getBlogComment(Integer bid) {
        return this.baseMapper.getBlogComment(bid);
    }

    @Override
    public boolean deleteComment(String cid) {
        return this.removeById(cid);
    }

    @Override
    public boolean deleteCommentid(String cid) {
        return this.baseMapper.deleteCommentid(cid);
    }


}
